<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模块式开发</title>
</head>
<body>
    <div id="app">
        <p>
            {{}} 插值表达式，可以将vue的数据在视图中进行渲染
        </p>
        {{ msg }} 
        <h2> {{ web.title}} </h2>
        <h2> {{ web.url }}</h2>
    </div>

    <script type="module">
        import {createApp, reactive} from './js/vue.esm-browser.js'

        createApp({
            // setup选项，用于设置响应式数据和方法等 
            setup() {
                // reactive 
                const web = reactive({
                    title: "百度",
                    url: "https://www.baidu.com"
                })

                return {
                    msg: "success",
                    web
                }
            }
        }).mount("#app")
    </script>
</body>
</html>